package com.utooo.pojo.dto.purchase.contract;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContractObjectDTO {

    /**
     * 任务id
     */
    private String taskId;
    /**
     * 物料编码
     */
    @Schema(description = "物料编码")
    private String materialCode;

    /**
     * 物料名称
     */
    @Schema(description = "物料名称")
    private String materialName;

    /**
     * 税率编码
     */
    @Schema(description = "税率编码")
    private String taxRateCode;

    /**
     * 需求数量
     */
    @Schema(description = "需求数量")
    private Integer demandQuantity;

    /**
     * 最小起订量
     */
    @Schema(description = "最小起订量")
    private Integer minimumOrderQuantity;

    /**
     * 不含税单价
     */
    @Schema(description = "不含税单价")
    private BigDecimal priceExcludingTax = BigDecimal.ZERO;

    /**
     * 含税单价
     */
    @Schema(description = "含税单价")
    private BigDecimal priceIncludingTax = BigDecimal.ZERO;

    /**
     * 订单编号
     */
    @Schema(description = "订单编号")
    private String orderNo;

    /**
     * 行金额
     */
    @Schema(description = "行金额")
    private BigDecimal lineAmount;

    /**
     * 期望收货日期
     */
    @Schema(description = "期望收货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expectedDeliveryDate;

}